package com.liujt.util.redis;

import java.io.Serializable;

/**
 * Created by liujt on 2017/2/21.
 */
public class Message implements Serializable {

    private final String key;
    private final byte[] val;

    public Message(String key, byte[] val) {
        this.key = key;
        this.val = val;
    }

    public String getKey() {
        return key;
    }

    public byte[] getVal() {
        return val;
    }

    @Override public String toString() {
        final StringBuilder sb = new StringBuilder("Message{");
        sb.append("key='").append(key).append('\'');
        sb.append(", val=").append(val);
        sb.append('}');
        return sb.toString();
    }
}
